﻿@model ModelTemplatesEntity
<div class="layui-row layui-col-space15">
	<div class="layui-col-md12">

		<div class="layui-card">
			<div class="layui-card-header layui-elem-quote">模板信息</div>
			<div class="layui-card-body" pad15>
				<form class="layui-form" asp-controller="CommonModel" asp-action="ModelTemplateEdit" wid100 method="post">
					<div class="layui-form-item">
						<label class="layui-form-label"><span class="c-red">*</span>模板名称</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" asp-for="TemplateName" data-val="true" data-val-required="不能为空">
							<span asp-validation-for="TemplateName" style="color:red;"></span>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label"><span class="c-red"></span>模板描述</label>
						<div class="layui-input-block">
							<textarea class="layui-textarea" asp-for="TemplateDescription"></textarea>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">模板类型</label>
						<div class="layui-input-block">
							@{
								if (Model.TemplateID <= 0)
								{
									<input type="checkbox" asp-for="IsEshop" lay-skin="switch" lay-text="商品模型|内容模型">
								}
								else
								{
									<input disabled type="checkbox" asp-for="IsEshop" lay-skin="switch" lay-text="商品模型|内容模型">
								}
							}
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
							<button type="submit" class="layui-btn layuiadmin-btn-list" lay-submit lay-filter="">保存</button>
							<button type="button" class="layui-btn layuiadmin-btn-list" onclick="layer_close()">取消</button>
							<input type="hidden" asp-for="TemplateID" />
							<input type="hidden" id="ModelID" name="ModelID" value="@ViewBag.ModelID" />
							<span style="color:red; font-size:18px;">@Html.ValidationSummary(true)</span>
						</div>
					</div>
					@Html.AntiForgeryToken()
				</form>
			</div>
		</div>
	</div>
</div>